//
//  LDMicroPageLineView.swift
//  DingDongZP
//
//  Created by 三秒文化 on 16/7/22.
//  Copyright © 2016年 51ledian.com. All rights reserved.
//

import UIKit

class LDMicroPageLineView: UIView {

    
    let lab = UILabel.setDetailsLab("标题", fontSize: 15, titleColor: LDFontColor.Green, Alignment: .Center)
    
    let leftLine = UIImageView.setupDivideLine_H(LDFrame.ScreenWidth/2.5);
    let rightLine = UIImageView.setupDivideLine_H(LDFrame.ScreenWidth/2.5);
    
    
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        
        setDefault()
//        backgroundColor = UIColor.redColor()
        
        
    }
    
    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func setDefault() {
        
        addSubview(lab)
        addSubview(leftLine)
        addSubview(rightLine)
        
        
        leftLine.snp_makeConstraints { (make) in
            make.left.equalTo(10)
            make.height.equalTo(1)
            make.centerY.equalTo(self)
            make.right.equalTo(lab.snp_left).offset(-10)
        }
        
        lab.snp_makeConstraints { (make) in
            make.center.equalTo(self)
            make.height.equalTo(20)
            
        }
        
        rightLine.snp_makeConstraints { (make) in
            
            make.left.equalTo(lab.snp_right).offset(10)
            make.right.equalTo(-10)
            make.height.equalTo(1)
            make.centerY.equalTo(self)
            
        }
    }
}
